//
//  HMRegistPhoneViewModel.m
//  获得
//
//  Created by mac on 17/1/8.
//  Copyright © 2017年 mac.gu. All rights reserved.
//

#import "HMRegistPhoneViewModel.h"
#import "YYModel.h"
#import "HMRegistPhoneViewModel.h"
#import "HMRegistModel.h"
@implementation HMRegistPhoneViewModel


#warning 注册返回信息
+ (void)postRegistPhoneNum:(NSString *)phoneNum andPassword:(NSString *)password Finished:(void (^)(id responseObject))finishedBlock Failed:(void (^)(NSError *))failedBlock{
    
    [[HMNetWorkTool sharedTool]requstRegisterPhoneNum:phoneNum password:password Finished:^(id responseObject) {
        NSDictionary *jsonDict = responseObject;

        
//        fcba4bdd6d1744758f7eaf8971b0b486
//        13001998 888
        HMRegistModel *model= [HMRegistModel yy_modelWithDictionary:jsonDict[@"data"]];
//        NSLog(@"%@",model.token);
//        
//        NSLog(@"%@",model.phone_num);
//        NSLog(@"%@",responseObject[@"code"]);
//        NSLog(@"%@",responseObject);
        
        finishedBlock(responseObject);
        
        
    } Failed:^(NSError *error) {
        failedBlock(error);
        NSLog(@"%@",error);
    }];
    
}

@end
